package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.HistoryRecordsMapper;
import com.ruoyi.business.domain.HistoryRecords;
import com.ruoyi.business.service.IHistoryRecordsService;

/**
 * 合同历史记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-13
 */
@Service
public class HistoryRecordsServiceImpl implements IHistoryRecordsService 
{
    @Autowired
    private HistoryRecordsMapper historyRecordsMapper;

    /**
     * 查询合同历史记录
     * 
     * @param id 合同历史记录主键
     * @return 合同历史记录
     */
    @Override
    public HistoryRecords selectHistoryRecordsById(Long id)
    {
        return historyRecordsMapper.selectHistoryRecordsById(id);
    }

    /**
     * 查询合同历史记录列表
     * 
     * @param historyRecords 合同历史记录
     * @return 合同历史记录
     */
    @Override
    public List<HistoryRecords> selectHistoryRecordsList(HistoryRecords historyRecords)
    {
        return historyRecordsMapper.selectHistoryRecordsList(historyRecords);
    }

    /**
     * 新增合同历史记录
     * 
     * @param historyRecords 合同历史记录
     * @return 结果
     */
    @Override
    public int insertHistoryRecords(HistoryRecords historyRecords)
    {
        return historyRecordsMapper.insertHistoryRecords(historyRecords);
    }

    /**
     * 修改合同历史记录
     * 
     * @param historyRecords 合同历史记录
     * @return 结果
     */
    @Override
    public int updateHistoryRecords(HistoryRecords historyRecords)
    {
        return historyRecordsMapper.updateHistoryRecords(historyRecords);
    }

    /**
     * 批量删除合同历史记录
     * 
     * @param ids 需要删除的合同历史记录主键
     * @return 结果
     */
    @Override
    public int deleteHistoryRecordsByIds(Long[] ids)
    {
        return historyRecordsMapper.deleteHistoryRecordsByIds(ids);
    }

    /**
     * 删除合同历史记录信息
     * 
     * @param id 合同历史记录主键
     * @return 结果
     */
    @Override
    public int deleteHistoryRecordsById(Long id)
    {
        return historyRecordsMapper.deleteHistoryRecordsById(id);
    }
}
